
//@flow

/**
 * 一般情况下不会修改这里的内容
 * 
 * 只有在系统权限发生变化的时候才会
 */

export type PermissionProps = {
    key:'location'|'camera'|'microphone'|'photo'|'contacts'|'event'|'bluetooth'|'reminder'|'notification'|'backgroundRefresh'|'speechRecognition'|'mediaLibrary'|'motion'|'storage'|'callPhone'|'readSms'|'receiveSms',
    label:string,
    type:string|Array<string>|null,
    platform:'ios'|'android'|'all',
}

export const PermissionList:Array<PermissionProps> = [
    {
        key:'location',
        label:'位置信息(使用期间)',
        type:'whenInUse',
        platform:'all'
    },
    // {
    //     key:'location',
    //     label:'位置信息(后台使用)',
    //     type:'always',
    //     platform:'all'
    // },
    {
        key:'camera',
        label:'相机',
        type:null,
        platform:'all'
    },
    {
        key:'microphone',
        label:'麦克风',
        type:null,
        platform:'all'
    },
    {
        key:'photo',
        label:'相册',
        type:null,
        platform:'all',
    },
    {
        key:'contacts',
        label:'联系人',
        type:null,
        platform:'all'
    },
    // {
    //     key:'event',
    //     label:'事件',
    //     type:null,
    //     platform:'all'
    // },
    {
        key:'bluetooth',
        label:'蓝牙',
        type:null,
        platform:'ios'
    },
    {
        key:'reminder',
        label:'提醒事项',
        type:null,
        platform:'ios',
    },
    {
        key:'notification',
        label:'推送通知',
        type:['alert','badge','sound'],
        platform:'ios'
    },
    // {
    //     key:'backgroundRefresh',
    //     label:'后台刷新',
    //     type:'null',
    //     platform:'ios'
    // },
    {
        key:'speechRecognition',
        label:'语音助手',
        type:null,
        platform:'ios'
    },
    {
        key:'mediaLibrary',
        label:'媒体库',
        type:null,
        platform:'ios'
    },
    {
        key:'motion',
        label:'活动与体能训练',
        type:null,
        platform:'ios'
    },
    {
        key:'storage',
        label:'存储',
        type:null,
        platform:'android'
    },
    {
        key:'callPhone',
        label:'电话',
        type:null,
        platform:'android'
    },
    {
        key:'readSms',
        label:'访问短信',
        type:null,
        platform:'android'
    },
    {
        key:'receiveSms',
        label:'接收短信',
        type:null,
        platform:'android'
    }

] 